require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 4,["7"] = 4,["8"] = 4,["10"] = 4,["11"] = 7,["12"] = 8,["15"] = 11,["16"] = 11,["17"] = 11,["18"] = 11,["19"] = 11,["20"] = 11,["21"] = 11,["22"] = 7,["23"] = 15,["24"] = 17,["25"] = 18,["26"] = 19,["27"] = 20,["28"] = 22,["29"] = 23,["30"] = 24,["31"] = 24,["32"] = 24,["33"] = 24,["34"] = 24,["35"] = 24,["36"] = 24,["37"] = 25,["38"] = 26,["39"] = 15,["40"] = 30,["41"] = 31,["42"] = 32,["43"] = 33,["44"] = 30,["45"] = 36,["46"] = 37,["47"] = 38,["48"] = 39,["49"] = 36,["50"] = 45,["51"] = 46,["52"] = 47,["54"] = 49,["55"] = 50,["57"] = 52,["58"] = 53,["59"] = 45,["60"] = 5,["61"] = 43,["62"] = 4});
local ____exports = {}
local ____trigger = require("solar.w3ts.handles.trigger")
local Trigger = ____trigger.Trigger
____exports.default = __TS__Class()
local DebugUtil = ____exports.default
DebugUtil.name = "DebugUtil"
function DebugUtil.prototype.____constructor(self)
end
function DebugUtil.showText(text)
    if ____exports.default.noDebug then
        return
    end
    DisplayTimedTextToPlayer(
        GetLocalPlayer(),
        0,
        0,
        30,
        text
    )
end
function DebugUtil.countExecuteTime(func)
    local o = os
    local start = o.clock()
    func(nil)
    local useTime = o.clock() - start
    local stringTs = string
    local info = ("函数执行时间=" .. tostring(stringTs.format("%.3f", useTime * 1000))) .. "毫秒"
    DisplayTimedTextToPlayer(
        GetLocalPlayer(),
        0,
        0,
        20,
        info
    )
    print(info)
    return useTime
end
function DebugUtil.onTime(time, actionFunc)
    local trigger = __TS__New(Trigger)
    trigger:registerTimerEvent(time, false)
    trigger:addAction(actionFunc)
end
function DebugUtil.onChat(char, actionFunc)
    local trigger = __TS__New(Trigger)
    trigger:registerAnyPlayerChatEvent(char, true)
    trigger:addAction(actionFunc)
end
function DebugUtil.isLimitTime(key, time)
    if not ____exports.default.limitTimeCache[key] then
        ____exports.default.limitTimeCache[key] = 1
    end
    if ____exports.default.limitTimeCache[key] > time then
        return true
    end
    ____exports.default.limitTimeCache[key] = ____exports.default.limitTimeCache[key] + 1
    return false
end
DebugUtil.noDebug = false
DebugUtil.limitTimeCache = {}
____exports.default = DebugUtil
return ____exports
